home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Telnet / NCSA / tn3270 2.4d7 source / tn3270 / library.kbmap < prev    next >
Text File  |  1992-04-17  |  15KB  |  511 lines

  1. #
  2. #  tn3270 for the Macintosh Source Code
  3. #  Brown University Computing and Information Services
  4. #  Version 2.4d7  April, 1992
  5. #  Copyright (c) 1988, 1989, 1990, 1991, 1992 by Brown University and by
  6. #  Peter John DiCamillo.
  7. #
  8. #  Permission is granted to any individual or institution to use, copy,
  9. #  or redistribute the binary version of this software and its
  10. #  documentation provided this notice and the copyright notices are
  11. #  retained.  Permission is granted to any individual or non-profit
  12. #  institution to use, copy, modify, or redistribute the source files
  13. #  of this software provided this notice and the copyright notices are
  14. #  retained.  This software may not be distributed for profit, either
  15. #  in original form or in derivative works, nor can the source be
  16. #  distributed to other than an individual or a non-profit institution.
  17. #  Any  individual or group interested in seeing and/or using these
  18. #  source files but who are prevented from doing so by the above
  19. #  constraints should contact Don Wolfe, Assistant Vice-President for
  20. #  Computer Systems at Brown University, (401) 863-7250, for possible
  21. #  software licensing of the source developed at Brown.
  22. #
  23. #  Brown University and Peter John DiCamillo make no representations
  24. #  about the suitability of this software for any purpose.
  25. #
  26. #  BROWN UNIVERSITY AND PETER JOHN DICAMILLO GIVE NO WARRANTY, EITHER
  27. #  EXPRESS OR IMPLIED, FOR THE PROGRAM AND/OR DOCUMENTATION PROVIDED,
  28. #  INCLUDING, WITHOUT LIMITATION, WARRANTY OF MERCHANTABILITY AND
  29. #  WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
  30. #
  31.  
  32. #
  33. # tn3270 keycode mapping definition
  34. #
  35. # General syntax rules:
  36. #    Case is ignored except in the name of the key mapping, and in character
  37. #    literals, e.g. 'a'.
  38. #
  39. #    Blank lines, white space, and any text following "#" on a line is ignored.
  40. #
  41. # The three types of definition lines are the mapping name definition, the
  42. # mapping number definition, and the key mapping definition:
  43. #
  44. #    To name this mapping:
  45. #        name: {mapping name}
  46. #    Underscores in the name are replaced by blanks.  Use two consecutive
  47. #    underscores to include an underscore in the name.
  48. #
  49. #    To assign a resource number for this mapping:
  50. #        number: {resource number}
  51. #    This number is only used when the resource is written out in "Rez"
  52. #    file format.
  53. #
  54. #    To map a function to a key sequence:
  55. #         function = [modifier] {'literal' | "hexcode" | "Khexcode"}
  56. #
  57. #    Function names are listed below.  Following each name enclosed in
  58. #    parenthesis is the EBCDIC hex code the name maps to.
  59. #      Punctuation Marks:
  60. #        space (40)        cent (4A)        period (4B)            less (4C)
  61. #        lparen (4D)        plus (4E)        or (4F)                ampersand (50)
  62. #        exclaim (5A)    dollar (5B)        asterisk (5C)        rparen (5D)
  63. #        semi (5E)        not (5F)        minus (60)            slash (61)
  64. #        vertical (6A)    comma (6B)        percent (6C)        underscore (6D)
  65. #        greater (6E)    question (6F)    accent (79)            colon (7A)
  66. #        pound (7B)        at (7C)            apostrophe (7D)        equal (7E)
  67. #        dblquote (7F)    tilde (A1)        lbrack (AD)            rbrack (BD)
  68. #        lbrace (C0)        rbrace (D0)
  69. #      Lowercase Letters:
  70. #        lca through lci (81 through 89)
  71. #        lcj through lcr (91 through 99)
  72. #        lcs through lcz (A2 through A9)
  73. #      Uppercase Letters:
  74. #        a through i    (C1 through C9)
  75. #        j through r (D1 through D9)
  76. #        s through z (E2 through E9)
  77. #      Digits:
  78. #        0 through 9 (F0 through F9)
  79. #      APL Characters: (hex codes given are preceded by Graphics Escape)
  80. #        Note: APL mode must be in effect for these characters to be generated.
  81. #        a_ through i_ (41 through 49) (underscored uppercase letters)
  82. #        j_ through r_ (51 through 59)
  83. #        s_ through z_ (62 through 69)
  84. #        i-beam (DA)            del-tilde (FB)        grade-down (DC)
  85. #        grade-up (DD)        vert-rotate (CD)    transpose (CF)
  86. #        hor-rotate (ED)        logarithm (FD)        nor (CB)
  87. #        nand (CA)            apl-exclaim (DB)    domino (EE)
  88. #        quote-quad (DE)        delta_ (FC)            format (FE)
  89. #        execute (EF)        lamp (DF)            expand (EB)
  90. #        compress (EA)
  91. #      ALA Characters (for use the built-in ALA font)
  92. #        subfield_delimiter (1F)            acute (9B)
  93. #        end_of_line (2A)                ala_circumflex (9C)
  94. #        start_of_message (38)            hacek (9D)
  95. #        paragraph (39)                    ligature_second_half (9E)
  96. #        dagger (3A)                        double_tilde_second_half (9F)
  97. #        double_dagger (3B)                ala_dagger (A0)
  98. #        polish_l_upper (41)                sub_plus (AA)
  99. #        scandinavian_o_upper (42)        sub_lparen (AB)
  100. #        d_with_crossbar_upper (43)        pincushion (AC)
  101. #        icelandic_thorn_upper (44)        sub_minus (AE)
  102. #        digraph_ae_upper (45)            sub_rparen (AF)
  103. #        digraph_oe_upper (46)            sup0 (B0)
  104. #        o-hook_upper (47)                sup1 (B1)
  105. #        u-hook_upper (48)                sup2 (B2)
  106. #        soft_sign (49)                    sup3 (B3)
  107. #        polish_l_lower (51)                sup4 (B4)
  108. #        scandinavian_o_lower (52)        sup5 (B5)
  109. #        d_with_crossbar_lower (53)        sup6 (B6)
  110. #        icelandic_thorn_lower (54)        sup7 (B7)
  111. #        digraph_ae_lower (55)            sup8 (B8)
  112. #        digraph_oe_lower (56)            sup9 (B9)
  113. #        o-hook_lower (57)                sup_plus (BA)
  114. #        u-hook_lower (58)                sup_lparen (BB)
  115. #        hard_sign (59)                    asper (BC)
  116. #        ayn (62)                        sup_minus (BE)
  117. #        alif (63)                        sup_rparen (BF)
  118. #        dot_in_middle_of_line (64)        circle_below (CA)
  119. #        turkish_i_lower (65)            dot_below (CB)
  120. #        musical_flat (66)                double_dot_below (CC)
  121. #        subscript_patent_mark (67)        breve (CD)
  122. #        eth (68)                        ala_tilde (CE)
  123. #        plus_or_minus (69)                pseudo_question (CF)
  124. #        sub0 (70)                        cedilla (DA)
  125. #        sub1 (71)                        high_comma_centered (DB)
  126. #        sub2 (72)                        right_hook (DC)
  127. #        sub3 (73)                        upadhmaniya (DD)
  128. #        sub4 (74)                        macron (DE)
  129. #        sub5 (75)                        double_acute (DF)
  130. #        sub6 (76)                        british_pound (E1)
  131. #        sub7 (77)                        right_cedilla (EA)
  132. #        sub8 (78)                        high_comma_off_center (EB)
  133. #        script_l (80)                    left_hook/tail (EC)
  134. #        circle_above (8A)                ala_underscore (ED)
  135. #        superior_dot (8B)                double_underscore (EE)
  136. #        umlaut (8C)                        ala_alpha (FA)
  137. #        candrabindu (8D)                ala_beta (FB)
  138. #        ligature_first_half (8E)        ala_gamma (FC)
  139. #        double_tilde_first_half (8F)    yen (FD)
  140. #        sub9 (90)                        peso (FE)
  141. #        grave (9A)
  142. #      Attention Keys: (hex codes are the AID codes transmitted)
  143. #        pf1 through pf9 (F1 through F9)
  144. #        pf10 through pf12 (7A through 7C)
  145. #        pf13 through pf21 (C1 through C9)
  146. #        pf22 through pf24 (4A through 4C)
  147. #        enter (7D)        pa1 (6C)        pa2 (6E)        pa3 (6B)
  148. #        clear (6D)        treq (F0)        cursel (7E)
  149. #      Cursor Movement:
  150. #        up                down            left        right        tab
  151. #        backtab            newline            home        up*2        down*2
  152. #        left*2            right*2
  153. #      Editing:
  154. #        erase-eof        erase-input        delete-char        insert-char
  155. #        dup                field-mark        rub-out
  156. #      Program Control:
  157. #        insert-mode (toggle insert mode)
  158. #        apl-mode (toggle keyboard APL mode)
  159. #        cursor-pos (toggle cursor position display)
  160. #        reset (unlock keyboard)
  161. #        prog-reset (reset program; resets above modes and I/O)
  162. #        print-screen  (equivalent to "Print Screen..." from the "File" menu)
  163. #
  164. #    Modifier is: normal, shift, command, command-shift, or option.  
  165. #   If the user presses more than one modifier key, the precedence of the
  166. #    modifiers is: command-shift, command, option, and shift.  It is not
  167. #    possible to specify mapping for other combinations, such as command-option.
  168. #    For ASCII key mappings, when "modifier" is omitted, the mapping applies
  169. #    to both "normal" and "shift".  For keycode mappings, the default modifier
  170. #    is "normal", i.e. no modifiers.
  171. #
  172. #    'literal' specifies a mapping to the ASCII code defined by the character
  173. #    literal.
  174. #
  175. #    "hexcode" specifies a mapping to the ASCII code given in hex.  It must
  176. #    consist of exactly two hex digits.
  177. #
  178. #    "Khexcode" specifies a keycode mapping to the code given in hex.  It must
  179. #    consist of exactly two hex digits.
  180. #    If a keycode mapping is defined for a key, it takes precedence over an
  181. #    ASCII code mapping for it.
  182. #    Keycode mapping use the raw key codes provided by the Macintosh operating
  183. #    system for a key press event.  They are hardware dependent, and should only
  184. #    be used when keys which must be distinguished return the same ASCII codes.
  185. #    For keycode values see "The Toolbox Event Manager" chapter in volumes 1 and
  186. #    5 of "Inside Macintosh".
  187. #
  188. # tn3270 library mapping:
  189. #
  190. name: library
  191. number: 130
  192.  
  193. # charcter mappings
  194.  
  195. space = "20"        # spaces are ignored in literals too
  196. cent = option "d2"    # option [
  197. period = '.'
  198. less = '<'
  199. lparen = '('
  200. plus = '+'
  201. or = '|'
  202. ampersand = '&'
  203. exclaim = '!'
  204. dollar = '$'
  205. asterisk = '*'
  206. rparen = ')'
  207. semi = ';'
  208. not = '^'
  209. minus = '-'
  210. slash = '/'
  211. vertical = option '`'
  212. comma = ','
  213. percent = '%'
  214. underscore = '_'
  215. greater = '>'
  216. question = '?'
  217. accent = '`'
  218. colon = ':'
  219. pound = "23"    # can't use comment delimiter in a literal!
  220. at = '@'
  221. apostrophe = '''
  222. equal = '='
  223. dblquote = '"'
  224. lca = 'a'
  225. lcb = 'b'
  226. lcc = 'c'
  227. lcd = 'd'
  228. lce = 'e'
  229. lcf = 'f'
  230. lcg = 'g'
  231. lch = 'h'
  232. lci = 'i'
  233. lcj = 'j'
  234. lck = 'k'
  235. lcl = 'l'
  236. lcm = 'm'
  237. lcn = 'n'
  238. lco = 'o'
  239. lcp = 'p'
  240. lcq = 'q'
  241. lcr = 'r'
  242. lcs = 's'
  243. lct = 't'
  244. lcu = 'u'
  245. lcv = 'v'
  246. lcw = 'w'
  247. lcx = 'x'
  248. lcy = 'y'
  249. lcz = 'z'
  250. tilde = '~'
  251. lbrack = '['
  252. rbrack = ']'
  253. lbrace = '{'
  254. rbrace = '}'
  255. a = 'A'
  256. b = 'B'
  257. c = 'C'
  258. d = 'D'
  259. e = 'E'
  260. f = 'F'
  261. g = 'G'
  262. h = 'H'
  263. i = 'I'
  264. j = 'J'
  265. k = 'K'
  266. l = 'L'
  267. m = 'M'
  268. n = 'N'
  269. o = 'O'
  270. p = 'P'
  271. q = 'Q'
  272. r = 'R'
  273. s = 'S'
  274. t = 'T'
  275. u = 'U'
  276. v = 'V'
  277. w = 'W'
  278. x = 'X'
  279. y = 'Y'
  280. z = 'Z'
  281. backslash = '\'
  282. 0 = '0'
  283. 1 = '1'
  284. 2 = '2'
  285. 3 = '3'
  286. 4 = '4'
  287. 5 = '5'
  288. 6 = '6'
  289. 7 = '7'
  290. 8 = '8'
  291. 9 = '9'
  292. sub1 = command '1'
  293. sub2 = command '2'
  294. sub3 = command '3'
  295. sub4 = command '4'
  296. sub5 = command '5'
  297. sub6 = command '6'
  298. sub7 = command '7'
  299. sub8 = command '8'
  300. sub9 = command '9'
  301. sub0 = command '0'
  302. sub_minus = command '-'
  303. sub_plus = command '='
  304. sup1 = option "K12"
  305. sup1 = command-shift '1'
  306. sup2 = option "K13"
  307. sup2 = command-shift '2'
  308. sup3 = option "K14"
  309. sup3 = command-shift '3'
  310. sup4 = option "K15"
  311. sup4 = command-shift '4'
  312. sup5 = option "K17"
  313. sup5 = command-shift '5'
  314. sup6 = option "K16"
  315. sup6 = command-shift '6'
  316. sup7 = option "K1a"
  317. sup7 = command-shift '7'
  318. sup8 = option "K1c"
  319. sup8 = command-shift '8'
  320. sup9 = option "K19"
  321. sup9 = command-shift '9'
  322. sup0 = option "K1d"
  323. sup0 = command-shift '0'
  324. sup_minus = option "K1b"
  325. sup_minus = command-shift '-'
  326. sup_plus = option "K18"
  327. sup_plus = command-shift '='
  328. digraph_ae_upper = command-shift 'q'
  329. d_with_crossbar_upper = command-shift 'w'
  330. polish_l_upper = command-shift 'e'
  331. digraph_oe_upper = command-shift 'r'
  332. o-hook_upper = command-shift 't'
  333. scandinavian_o_upper = command-shift 'y'
  334. icelandic_thorn_upper = command-shift 'u'
  335. u-hook_upper = command-shift 'i'
  336. sup_lparen = command-shift '['
  337. sup_rparen = command-shift ']'
  338. digraph_ae_lower = command 'q'
  339. d_with_crossbar_lower = command 'w'
  340. polish_l_lower = command 'e'
  341. digraph_oe_lower = command 'r'
  342. o-hook_lower = command 't'
  343. scandinavian_o_lower = command 'y'
  344. icelandic_thorn_lower = command 'u'
  345. u-hook_lower = command 'i'
  346. sub_lparen = command '['
  347. sub_rparen = command ']'
  348. plus_or_minus = command '\'
  349. ala_alpha = command 'a'
  350. turkish_i_lower = command 's'
  351. ayn = command 'd'
  352. alif = command 'f'
  353. soft_sign = command 'g'
  354. hard_sign = command-shift 'g'
  355. script_l = command 'z'
  356. british_pound = command-shift 'z'
  357. musical_flat = command 'x'
  358. subscript_patent_mark = command-shift 'x'
  359. ala_gamma = command 'c'
  360. eth = command 'v'
  361. ala_dagger = command-shift 'v'
  362. ala_beta = command 'b'
  363. dot_in_middle_of_line = command-shift 'b'
  364. upadhmaniya = normal "1b"                # keypad clear
  365. candrabindu = shift "1b"                # keypad clear
  366. ala_underscore =  normal "K51"            # keypad = (ADB keypad)
  367. double_underscore = shift "K51"            # keypad = (ADB keypad)
  368. ala_underscore = shift "K48"            # keypad , (numeric/Plus keypad)
  369. double_underscore = command-shift "K48"    # keypad , (numeric/Plus keypad)
  370. double_dot_below = "K4b"                # keypad / (ADB keypad)
  371. double_dot_below = shift "K4d"            # keypad / (numeric/Plus keypad)
  372. double_tilde_first_half = normal "K43"    # keypad * (ADB keypad)
  373. double_tilde_first_half = shift "K42"    # keypad * (numeric/Plus keypad)
  374. double_tilde_second_half = shift "K43"    # keypad * (ADB keypad)
  375. double_tilde_second_half = command-shift "K42"  # keypad * (numeric/Plus keypad)
  376. umlaut = normal "K59"                    # keypad 7
  377. acute = normal "K5b"                    # keypad 8
  378. double_acute = shift "K5b"                # keypad 8
  379. macron = normal "K5c"                    # keypad 9
  380. breve = shift "K5c"                        # keypad 9
  381. left_hook/tail = normal "K4e"            # keypad -
  382. right_hook = shift "K4e"                # keypad -
  383. ala_circumflex = normal "K56"            # keypad 4
  384. hacek = shift "K56"                        # keypad 4
  385. ala_tilde = normal "K57"                # keypad 5
  386. cedilla = normal "K58"                    # keypad 6
  387. right_cedilla = shift "K58"                # keypad 6
  388. high_comma_centered = normal "K45"        # keypad + (ADB keypad)
  389. high_comma_centered = shift "K46"        # keypad + (numeric/Plus keypad)
  390. high_comma_off_center = shift "K45"        # keypad + (ADB keypad)
  391. high_comma_off_center = command-shift "K46"  # keypad + (numeric/Plus keypad)
  392. dot_below = normal "K53"                # keypad 1
  393. superior_dot = shift "K53"                # keypad 1
  394. grave = normal "K54"                    # keypad 2
  395. circle_below = normal "K55"                # keypad 3
  396. circle_above = shift "K55"                # keypad 3
  397. ligature_first_half = normal "K4c"        # keypad enter
  398. ligature_second_half = shift "K4c"        # keypad enter
  399. pseudo_question = normal "K41"            # keypad .
  400.  
  401. double_dagger = option "K52"    # keypad 0
  402. dagger = shift "K52"            # keypad 0
  403.  
  404. enter = normal "0d"
  405.  
  406. pf1 = "K7a"                    # F1
  407.  
  408. pf2 = "K78"                    # F2
  409.  
  410. pf3 = "K63"                    # F3
  411.  
  412. pf4 = "K76"                    # F4
  413.  
  414. pf5 = "K60"                    # F5
  415.  
  416. pf6 = "K61"                    # F6
  417.  
  418. pf7 = "K62"                    # F7
  419. pf7 = "K74"                    # page up
  420.  
  421. pf8 = "K64"                    # F8
  422. pf8 = "K79"                    # page down
  423.  
  424. pf9 = "K65"                    # F9
  425.  
  426. pf10 = "K6d"                # F10
  427.  
  428. pf11 = "K67"                # F11
  429.  
  430. pf12 = "K6f"                # F12
  431.  
  432. pf13 = "K69"                # F13
  433. pf13 = shift "K7a"            # F1
  434.  
  435. pf14 = "K6b"                # F14
  436. pf14 = shift "K78"            # F2
  437.  
  438. pf15 = "K71"                # F15
  439. pf15 = shift "K63"            # F3
  440.  
  441. pf16 = shift "K76"            # F4
  442.  
  443. pf17 = shift "K60"            # F5
  444.  
  445. pf18 = shift "K61"            # F6
  446.  
  447. pf19 = shift "K62"            # F7
  448.  
  449. pf20 = shift "K64"            # F8
  450.  
  451. pf21 = shift "K65"            # F9
  452.  
  453. pf22 = shift "K6d"            # F10
  454.  
  455. pf23 = shift "K67"            # F11
  456.  
  457. pf24 = shift "K6f"            # F12
  458.  
  459. pa1 = command ','
  460.  
  461. pa2 = command '.'
  462.  
  463. pa3 = command "03"    # enter
  464.  
  465. treq = command '/'
  466.  
  467. cursel = command 'l'
  468.  
  469. up = "1e"                    # up arrow code
  470.  
  471. down = "1f"                    # down arrow code
  472.  
  473. left = "1c"                    # left arrow code
  474. left = normal "08"            # backspace/delete code
  475.  
  476. right = "1d"                # right arrow code
  477.  
  478. tab = normal "09"            # tab key
  479. backtab = shift "09"
  480.  
  481. newline = "03"                # enter key
  482. newline = shift "0d"        # return key
  483.  
  484. home = "K73"                # home key
  485.  
  486. delete-char = shift "08"    # backspace/delete key
  487. delete-char = "K75"        # X (Del) key
  488.  
  489. dup = option "K02"            # dup
  490.  
  491. field-mark = option "K03"    # "F" key
  492. field-mark = option "K76"    # F4
  493.  
  494. insert-char = option "08"    # backspace/delete key
  495.  
  496. rub-out = command "08"        # backspace/delete key
  497.  
  498. up*2 = option "1e"            # up arrow code
  499.  
  500. down*2 = option "1f"        # down arrow code
  501.  
  502. left*2 = option "1c"        # left arrow code
  503.  
  504. right*2 = option "1d"        # right arrow code
  505.  
  506. insert-mode = "K72"            # ins/help
  507. erase-eof = "K77"            # end
  508. clear = shift "K73"            # home key
  509.  
  510. print-screen = shift "K69"    # shift F13
  511.